package com.lzh.chatnote.chat.controller;

import com.lzh.chatnote.chat.domain.vo.response.contact.ChatRoomResp;
import com.lzh.chatnote.chat.service.ContactService;
import com.lzh.chatnote.common.domain.response.ApiResult;
import com.lzh.chatnote.common.domian.vo.request.CursorPageBaseReq;
import com.lzh.chatnote.common.domian.vo.response.CursorPageBaseResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * <p>
 * 会话列表,联系人列表 前端控制器
 * </p>
 *
 * @author lzh
 * @since 2025-09-25
 */
@Api(tags = "会话接口控制器")
@RestController
@RequestMapping("/api/contact")
public class ContactController {

    @Resource
    private ContactService contactService;

    /**
     * 获取用户会话分页查询列表
     */
    @ApiOperation("用户会话分页查询列表")
    @GetMapping("/queryCursorPage")
    public ApiResult<CursorPageBaseResp<ChatRoomResp>> queryCursorPage(@Valid CursorPageBaseReq cursorPageBaseReq){
        return ApiResult.success(contactService.queryCursorPage(cursorPageBaseReq));
    }

}

